package com.zhiche.wms.domain.model.base;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 仓库信息
 * </p>
 *
 * @author qichao
 * @since 2018-06-08
 */
@TableName("w_storehouse")
public class Storehouse extends Model<Storehouse> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 发车点编码
     */
    private String code;
    /**
     * 发车点名称
     */
    private String name;
    /**
     * 所在省份
     */
    private String province;
    /**
     * 所在城市
     */
    private String city;
    /**
     * 所在区县
     */
    private String county;
    /**
     * 详细地址
     */
    private String address;
    /**
     * 联系人
     */
    @TableField("link_man")
    private String linkMan;
    /**
     * 联系电话
     */
    @TableField("link_phone")
    private String linkPhone;
    /**
     * 最大存储量
     */
    @TableField("max_storage")
    private BigDecimal maxStorage;
    /**
     * 状态(10:正常,20:失效)
     */
    private String status;
    /**
     * 备注
     */
    private String remark;
    /**
     * 创建人
     */
    @TableField("user_create")
    private String userCreate;
    /**
     * 修改人
     */
    @TableField("user_modified")
    private String userModified;
    /**
     * 创建时间
     */
    @TableField("gmt_create")
    private Date gmtCreate;
    /**
     * 修改时间
     */
    @TableField("gmt_modified")
    private Date gmtModified;

    @TableField(exist = false)
    private Long actualStock;

    /**
     * 仓库属性（10：正常仓库，20:无单区仓库,30：二者均可）
     */
    private String property;

    public String getProperty () {
        return property;
    }

    public void setProperty (String property) {
        this.property = property;
    }

    public Long getActualStock () {
        return actualStock;
    }

    public void setActualStock (Long actualStock) {
        this.actualStock = actualStock;
    }

    public Long getId () {
        return id;
    }

    public void setId (Long id) {
        this.id = id;
    }

    public String getCode () {
        return code;
    }

    public void setCode (String code) {
        this.code = code;
    }

    public String getName () {
        return name;
    }

    public void setName (String name) {
        this.name = name;
    }

    public String getProvince () {
        return province;
    }

    public void setProvince (String province) {
        this.province = province;
    }

    public String getCity () {
        return city;
    }

    public void setCity (String city) {
        this.city = city;
    }

    public String getCounty () {
        return county;
    }

    public void setCounty (String county) {
        this.county = county;
    }

    public String getAddress () {
        return address;
    }

    public void setAddress (String address) {
        this.address = address;
    }

    public String getLinkMan () {
        return linkMan;
    }

    public void setLinkMan (String linkMan) {
        this.linkMan = linkMan;
    }

    public String getLinkPhone () {
        return linkPhone;
    }

    public void setLinkPhone (String linkPhone) {
        this.linkPhone = linkPhone;
    }

    public BigDecimal getMaxStorage () {
        return maxStorage;
    }

    public void setMaxStorage (BigDecimal maxStorage) {
        this.maxStorage = maxStorage;
    }

    public String getStatus () {
        return status;
    }

    public void setStatus (String status) {
        this.status = status;
    }

    public String getRemark () {
        return remark;
    }

    public void setRemark (String remark) {
        this.remark = remark;
    }

    public String getUserCreate () {
        return userCreate;
    }

    public void setUserCreate (String userCreate) {
        this.userCreate = userCreate;
    }

    public String getUserModified () {
        return userModified;
    }

    public void setUserModified (String userModified) {
        this.userModified = userModified;
    }

    public Date getGmtCreate () {
        return gmtCreate;
    }

    public void setGmtCreate (Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified () {
        return gmtModified;
    }

    public void setGmtModified (Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    protected Serializable pkVal () {
        return this.id;
    }

    @Override
    public String toString () {
        return "Storehouse{" +
                ", id=" + id +
                ", code=" + code +
                ", name=" + name +
                ", province=" + province +
                ", city=" + city +
                ", county=" + county +
                ", address=" + address +
                ", linkMan=" + linkMan +
                ", linkPhone=" + linkPhone +
                ", maxStorage=" + maxStorage +
                ", status=" + status +
                ", remark=" + remark +
                ", userCreate=" + userCreate +
                ", userModified=" + userModified +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                "}";
    }
}
